package com.longdaji.decoration.utils;

import android.content.Context;
import android.net.ConnectivityManager;

import com.longdaji.decoration.DecorationApplication;


/**
 * Created by longtao on 2018/1/4.
 */

public class SystemUtil {
    /**
     * 检查是否有可用网络
     */
    public static boolean isNetworkConnected() {
        ConnectivityManager connectivityManager = (ConnectivityManager) DecorationApplication.getInstance().getApplicationContext().getSystemService(Context.CONNECTIVITY_SERVICE);
        return connectivityManager.getActiveNetworkInfo() != null;
    }

}
